﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public class NavObject
{
    string title;

    public string Title
    {
        get { return title; }
        set { title = value; }
    }
    string url;

    public string Url
    {
        get { return url; }
        set { url = value; }
    }

    string toolTip;

    public string ToolTip
    {
        get { return toolTip; }
        set { toolTip = value; }
    }
}

public partial class Controls_NavigateURL : System.Web.UI.UserControl
{

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    public string PageTitle
    {
        get
        {
            return litNav.Text;
        }
        set
        {
            litNav.Text = "<li class='category5'><strong><span>" + value + "</span></strong> </li>";
        }
    }

    

    public void SetNav(NavObject[] nav)
    {
        litNav.Text = "";
        for (int i = 0; i < nav.Length; i++)
        {
            
            if (nav[i].Url != "")
                litNav.Text += string.Format("<li class='home'><a href='{0}' title='{1}'>{2}</a> <span>/ </span></li>", nav[i].Url, nav[i].ToolTip, nav[i].Title);
            else
                litNav.Text += "<li class='category5'><strong><span>" + nav[i].Title + "</span></strong> </li>";
        }
    }
}